Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sync script for gsuite-myaegee #188

Merged
merged 7 commits into from
Mar 20, 2021
Merged

Conversation

linuxbandit
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Nov 23, 2020

Codecov Report

Merging #188 (0493e7b) into master (9c8606e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #188   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           42        42           
  Lines         1339      1339           
  Branches       211       211           
=========================================
  Hits          1339      1339           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c8606e...0493e7b. Read the comment docs.

@linuxbandit
Copy link
Member Author

as per rik's suggestion on slack: createOneForThesePoorGuys is useless if we make the frontend create one on login. We can avoid the fear of hitting the quotas of gsuite

Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some notes on what still needs to be changed

scripts/sync-gsuite.js Outdated Show resolved Hide resolved
scripts/sync-gsuite.js Outdated Show resolved Hide resolved
scripts/sync-gsuite.js Outdated Show resolved Hide resolved
@WikiRik
Copy link
Member

WikiRik commented Feb 11, 2021

@linuxbandit people are forced to change away from @aegee.eu but they cannot use their GSuite for notifications until this is set. Can you work on this?


try{

const part1 = await superagent.get('gsuite-wrapper:8084/accounts?max=500')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

await request({
url: 'gsuite-wrapper:8084/accounts?max=500',
method: 'GET'});

I think this would work and remove the need for installing superagent

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const request = require('request-promise-native');

At the top

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done and tested (not tested with a prod db though, just tested the translation and that the requests don't error)

@linuxbandit linuxbandit marked this pull request as ready for review March 20, 2021 10:51
@linuxbandit
Copy link
Member Author

also I do not remember how I used to run it: certainly not with node filename.js because obviously the async stuff gets executed after the 'console.log' of the results

@linuxbandit
Copy link
Member Author

i solved my last 'problem' of async stuff. @WikiRik you can test by importing teh prod db, adding the service account in gsuite-wrapper, and running the script on the docker container of core node ./scripts/sync-gsuite-users.js, you get the list of people with different second email addresses and a list of heuristics for who certain people could be. Which may be useless as of now, with the new ways for assigning gsuite to a person, but still good to have a warning in advance

@WikiRik WikiRik force-pushed the feat/sync-script-for-gsuite branch from 88ee9e2 to 0493e7b Compare March 20, 2021 20:49
@WikiRik WikiRik merged commit 1cba493 into master Mar 20, 2021
@WikiRik WikiRik deleted the feat/sync-script-for-gsuite branch March 20, 2021 20:55
serge1peshcoff pushed a commit that referenced this pull request Mar 20, 2021
# [1.33.0](1.32.1...1.33.0) (2021-03-20)

### Features

* sync script for gsuite-myaegee ([#188](#188)) ([1cba493](1cba493))
@serge1peshcoff
Copy link
Member

🎉 This PR is included in version 1.33.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants